/**
 *
 */
package com.naiterui.ehp.bs.recommend.bean;

import static javax.persistence.GenerationType.IDENTITY;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Version;

import org.hibernate.annotations.DynamicUpdate;

/**
 * 推荐用药处方信息
 * @author guoyongxiang
 * @since 2.9.0
 */
@DynamicUpdate
@Entity
@Table(name = "dr_medication_recom_info")
public class DrMedicationRecomInfo {


  /** 处方审核状态-不审核(默认) */
  public static final int RECOMMAND_CHECKING_STATUS_NO_CHECK = 0;
  /** 处方审核状态-审核中 */
  public static final int RECOMMAND_CHECKING_STATUS_IN_CHECK = 1;
  /** 处方审核状态-通过 */
  public static final int RECOMMAND_CHECKING_STATUS_PASS = 2;
  /** 处方审核状态-不通过 */
  public static final int RECOMMAND_CHECKING_STATUS_NOT_PASS = 3;
  /** 主键 */
  private Long id;
  /** 推荐ID */
  private Long recommendId;
  /** 医生ID */
  private Long doctorId;
  /** 患者ID */
  private Long patientId;
  /**
   * 就诊人id
   */
  private Long inquirerId;
  /**
   * 患者与就诊人关系，参考：InquirerRelationEnum,仅记录，实际以就诊人表为准
   */
  private Integer relation;
  /** 医生姓名 */
  private String doctorName;
  /** 患者姓名 */
  private String patientName;
  /** 患者年龄 */
  private Integer patientAge;
  /**
   * 患者年龄单位，目前固定为天，换算备用字段
   */
  private String patientAgeUnit;

  /**
   * 患者年龄（仅供显示使用）
   */
  private String patientAgeStr;
  /** 患者性别 */
  private Integer patientGender;
  /** 医生医院 */
  private String hospitalName;
  /** 医生科室 */
  private String departmentName;
  /** 医生备案医院ID */
  private Integer recordHospitalId;
  /** 医生电子签名状态(0:未签名,1:已签名(含部分签名成功),2:签名失败) */
  private Integer doctorSignStatus;
  /** 医生电子签名时间 */
  private Date doctorSignTime;
  /**
   * 初审药师ID
   */
  private Long prePharmacistId;
  /**
   * 初审药师姓名
   */
  private String prePharmacistName;
  /**
   * 药师ID
   */
  private Long pharmacistId;
  /** 药师姓名 */
  private String pharmacistName;
  /** 药师电子签名状态(0:未签名,1:已签名) */
  private Integer pharmacistSignStatus;
  /** 药师电子签名时间 */
  private Date pharmacistSignTime;
  /**
   * 核对发药人【医生端V3.4.0-by gongbaoqiang】
   */
  private String checkMedicationName;
  /**
   * 核对发药时间【医生端V3.4.0-by gongbaoqiang】
   */
  private Date checkMedicationTime;
  /** 处方审核状态 0:默认(不需要审核), 1:审核中, 2:审核通过, 3:审核不通过 */
  private Integer checkingStatus;
  /** 处方审核结果描述 */
  private String checkingDesc;
  /** 药师审核开关(0:关闭 1:开启) */
  private Integer checkingConfig;
  /** 药师自动审核延迟时间 */
  private Integer checkingDelay;
  /** 药师电子签名PIN码输入开关(0:关闭 1:开启) */
  private Integer checkingPinStatus;
  /** 药师电子签名开关开关(0:关闭 1:开启) */
  private Integer pharmacistSignConfig;
  /** B2C处方提示 */
  private String tips;
  /** 患者端展示阳光化费用标识(0:不展示,1:展示) */
  private Integer showPublicFee;
  /** 患者端展示阳光化费用-咨询费(单位分) */
  private Integer consultFee;
  /** 患者端展示阳光化费用-随访服务费(单位分) */
  private Integer visitFee;
  /** 病情ID */
  private String diseaseId;
  /** 病例ID */
  private String caseId;
  /** 创建时间 */
  private Date createdAt;
  /** 创建人 */
  private String createdBy;
  /** 修改时间 */
  private Date changedAt;
  /** 修改人 */
  private String changedBy;
  /** 乐观锁版本 */
  private Integer version;

  /**
   * 调配药师电子签名状态(0:未签名,1:已签名)
   */
  private Integer allocatePharmacistSignStatus;

  /**
   * 调配药师ID
   */
  private Long allocatePharmacistId;

  /**
   * 调配药师姓名
   */
  private String allocatePharmacistName;

  /** 药师电子签名时间 */
  private Date allocatePharmacistSignTime;

  /**
   * 审核类型-系统自动
   */
  public static final int AUDIT_TYPE_AUTO = 1;
  /**
   * 审核类型-人工
   */
  public static final int AUDIT_TYPE_MANUAL = 2;

  /** 药师电子签名开关-关 */
  public static final int PHARMACIST_SIGN_CONFIG_OFF = 0;
  /** 药师电子签名开关-开 */
  public static final int PHARMACIST_SIGN_CONFIG_ON = 1;

  /** 处方审核PIN码开关-关 */
  public static final int CHECKING_PIN_STATUS_OFF = 0;
  /** 处方审核PIN码开关-开 */
  public static final int CHECKING_PIN_STATUS_ON = 1;

  /** 审核状态-默认(不审核) */
  public static final int CHECKING_STATUS_DEF = 0;
  /** 审核状态-审核中 */
  public static final int CHECKING_STATUS_IN = 1;
  /** 审核状态-通过 */
  public static final int CHECKING_STATUS_PASS = 2;
  /** 审核状态-不通过 */
  public static final int CHECKING_STATUS_NOT_PASS = 3;
  /** 审核状态-已失效 */
  public static final int CHECKING_STATUS_EXPIRED = 4;

  /** 审核通过文案 */
  public static final String CHECKING_PASS_DESC = "处方已通过审核，患者可正常下单.";
  /** 审核不通过文案 */
  public static final String CHECKING_NOT_PASS_DESC = "处方未通过审核：";
  /** 处方审核超时失效文案 */
  public static final String CHECKING_EXPIRED_DESC = "超时未审核。";

  /** 医生电子签名状态(-1:不需要签名 0:未签名,1:已签名(含部分签名成功),2:签名失败) */
  public static final int DOCTOR_SIGN_STATUS_UNNEED = -1;
  /** 医生电子签名状态(0:未签名,1:已签名(含部分签名成功),2:签名失败) */
  public static final int DOCTOR_SIGN_STATUS_UNDO = 0;
  /** 医生电子签名状态(0:未签名,1:已签名(含部分签名成功),2:签名失败) */
  public static final int DOCTOR_SIGN_STATUS_DONE = 1;
  /** 医生电子签名状态(0:未签名,1:已签名(含部分签名成功),2:签名失败) */
  public static final int DOCTOR_SIGN_STATUS_FAIL = 2;

  /** 药师电子签名状态(0:未签名,1:已签名) */
  public static final int PHARMACIST_SIGN_STATUS_UNDO = 0;
  /** 药师电子签名状态(0:未签名,1:已签名) */
  public static final int PHARMACIST_SIGN_STATUS_DONE = 1;
  /**
   * 药师签名失败
   */
  public static final int PHARMACIST_SIGN_STATUS_FAIL = 2;
  /** 调配药师电子签名状态(0:未签名,1:已签名) */
  public static final int AL_PHARMACIST_SIGN_STATUS_UNDO = 0;
  /** 调配药师电子签名状态(0:未签名,1:已签名) */
  public static final int AL_PHARMACIST_SIGN_STATUS_DONE = 1;
  /**
   * 调配药师签名失败
   */
  public static final int AL_PHARMACIST_SIGN_STATUS_FAIL = 2;

  /** 阳光化扩展诊金金额-不显示 */
  public static final int PUBLIC_FEE_NOT_DISPLAY = 0;
  /** 阳光化扩展诊金金额-显示 */
  public static final int PUBLIC_FEE_DISPLAY = 1;

  /** 不审核药师签名默认延时时间 */
  public static final int DEFAULT_PHARMACIST_SIGN_DELAY = 5;

  @Id
  @Column(name = "id", unique = true, nullable = false)
  @GeneratedValue(strategy = IDENTITY)
  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  @Column(name = "recommend_id")
  public Long getRecommendId() {
    return recommendId;
  }

  public void setRecommendId(Long recommendId) {
    this.recommendId = recommendId;
  }

  @Column(name = "doctor_id")
  public Long getDoctorId() {
    return doctorId;
  }

  public void setDoctorId(Long doctorId) {
    this.doctorId = doctorId;
  }

  @Column(name = "patient_id")
  public Long getPatientId() {
    return patientId;
  }

  public void setPatientId(Long patientId) {
    this.patientId = patientId;
  }

  @Column(name = "inquirer_id")
  public Long getInquirerId() {
    return inquirerId;
  }

  public void setInquirerId(Long inquirerId) {
    this.inquirerId = inquirerId;
  }

  @Column(name = "relation")
  public Integer getRelation() {
    return relation;
  }

  public void setRelation(Integer relation) {
    this.relation = relation;
  }

  @Column(name = "doctor_name")
  public String getDoctorName() {
    return doctorName;
  }

  public void setDoctorName(String doctorName) {
    this.doctorName = doctorName;
  }

  @Column(name = "patient_name")
  public String getPatientName() {
    return patientName;
  }

  public void setPatientName(String patientName) {
    this.patientName = patientName;
  }

  @Column(name = "patient_age")
  public Integer getPatientAge() {
    return patientAge;
  }

  public void setPatientAge(Integer patientAge) {
    this.patientAge = patientAge;
  }

  @Column(name = "patient_age_unit")
  public String getPatientAgeUnit() {
    return patientAgeUnit;
  }

  @Column(name = "patient_age_str")
  public String getPatientAgeStr() {
    return patientAgeStr;
  }

  public void setPatientAgeStr(String patientAgeStr) {
    this.patientAgeStr = patientAgeStr;
  }

  public void setPatientAgeUnit(String patientAgeUnit) {
    this.patientAgeUnit = patientAgeUnit;
  }

  @Column(name = "patient_gender")
  public Integer getPatientGender() {
    return patientGender;
  }

  public void setPatientGender(Integer patientGender) {
    this.patientGender = patientGender;
  }

  @Column(name = "hospital_name")
  public String getHospitalName() {
    return hospitalName;
  }

  public void setHospitalName(String hospitalName) {
    this.hospitalName = hospitalName;
  }

  @Column(name = "department_name")
  public String getDepartmentName() {
    return departmentName;
  }

  public void setDepartmentName(String departmentName) {
    this.departmentName = departmentName;
  }

  @Column(name = "record_hospital_id")
  public Integer getRecordHospitalId() {
    return recordHospitalId;
  }

  public void setRecordHospitalId(Integer recordHospitalId) {
    this.recordHospitalId = recordHospitalId;
  }

  @Column(name = "doctor_sign_status")
  public Integer getDoctorSignStatus() {
    return doctorSignStatus;
  }

  public void setDoctorSignStatus(Integer doctorSignStatus) {
    this.doctorSignStatus = doctorSignStatus;
  }

  @Column(name = "doctor_sign_time")
  public Date getDoctorSignTime() {
    return doctorSignTime;
  }

  public void setDoctorSignTime(Date doctorSignTime) {
    this.doctorSignTime = doctorSignTime;
  }

  @Column(name = "pre_pharmacist_id")
  public Long getPrePharmacistId() {
    return prePharmacistId;
  }

  public void setPrePharmacistId(Long prePharmacistId) {
    this.prePharmacistId = prePharmacistId;
  }

  @Column(name = "pre_pharmacist_name")
  public String getPrePharmacistName() {
    return prePharmacistName;
  }

  public void setPrePharmacistName(String prePharmacistName) {
    this.prePharmacistName = prePharmacistName;
  }

  @Column(name = "pharmacist_id")
  public Long getPharmacistId() {
    return pharmacistId;
  }

  public void setPharmacistId(Long pharmacistId) {
    this.pharmacistId = pharmacistId;
  }

  @Column(name = "pharmacist_name")
  public String getPharmacistName() {
    return pharmacistName;
  }

  public void setPharmacistName(String pharmacistName) {
    this.pharmacistName = pharmacistName;
  }

  @Column(name = "pharmacist_sign_status")
  public Integer getPharmacistSignStatus() {
    return pharmacistSignStatus;
  }

  public void setPharmacistSignStatus(Integer pharmacistSignStatus) {
    this.pharmacistSignStatus = pharmacistSignStatus;
  }

  @Column(name = "pharmacist_sign_time")
  public Date getPharmacistSignTime() {
    return pharmacistSignTime;
  }

  public void setPharmacistSignTime(Date pharmacistSignTime) {
    this.pharmacistSignTime = pharmacistSignTime;
  }

  @Column(name = "checking_status")
  public Integer getCheckingStatus() {
    return checkingStatus;
  }

  public void setCheckingStatus(Integer checkingStatus) {
    this.checkingStatus = checkingStatus;
  }

  @Column(name = "checking_config")
  public Integer getCheckingConfig() {
    return checkingConfig;
  }

  public void setCheckingConfig(Integer checkingConfig) {
    this.checkingConfig = checkingConfig;
  }

  @Column(name = "checking_delay")
  public Integer getCheckingDelay() {
    return checkingDelay;
  }

  public void setCheckingDelay(Integer checkingDelay) {
    this.checkingDelay = checkingDelay;
  }

  @Column(name = "checking_pin_status")
  public Integer getCheckingPinStatus() {
    return checkingPinStatus;
  }

  public void setCheckingPinStatus(Integer checkingPinStatus) {
    this.checkingPinStatus = checkingPinStatus;
  }

  @Column(name = "pharmacist_sign_config")
  public Integer getPharmacistSignConfig() {
    return pharmacistSignConfig;
  }

  public void setPharmacistSignConfig(Integer pharmacistSignConfig) {
    this.pharmacistSignConfig = pharmacistSignConfig;
  }

  @Column(name = "tips")
  public String getTips() {
    return tips;
  }

  public void setTips(String tips) {
    this.tips = tips;
  }

  @Column(name = "show_public_fee")
  public Integer getShowPublicFee() {
    return showPublicFee;
  }

  public void setShowPublicFee(Integer showPublicFee) {
    this.showPublicFee = showPublicFee;
  }

  @Column(name = "consult_fee")
  public Integer getConsultFee() {
    return consultFee;
  }

  public void setConsultFee(Integer consultFee) {
    this.consultFee = consultFee;
  }

  @Column(name = "visit_fee")
  public Integer getVisitFee() {
    return visitFee;
  }

  public void setVisitFee(Integer visitFee) {
    this.visitFee = visitFee;
  }

  @Column(name = "created_at")
  public Date getCreatedAt() {
    return createdAt;
  }

  public void setCreatedAt(Date createdAt) {
    this.createdAt = createdAt;
  }

  @Column(name = "created_by")
  public String getCreatedBy() {
    return createdBy;
  }

  public void setCreatedBy(String createdBy) {
    this.createdBy = createdBy;
  }

  @Column(name = "changed_at")
  public Date getChangedAt() {
    return changedAt;
  }

  public void setChangedAt(Date changedAt) {
    this.changedAt = changedAt;
  }

  @Column(name = "changed_by")
  public String getChangedBy() {
    return changedBy;
  }

  public void setChangedBy(String changedBy) {
    this.changedBy = changedBy;
  }

  @Column(name = "checking_desc")
  public String getCheckingDesc() {
    return checkingDesc;
  }

  public void setCheckingDesc(String checkingDesc) {
    this.checkingDesc = checkingDesc;
  }

  @Version
  public Integer getVersion() {
    return version;
  }

  public void setVersion(Integer version) {
    this.version = version;
  }

  @Column(name = "check_medication_name")
  public String getCheckMedicationName() {
    return checkMedicationName;
  }

  public void setCheckMedicationName(String checkMedicationName) {
    this.checkMedicationName = checkMedicationName;
  }

  @Column(name = "check_medication_time")
  public Date getCheckMedicationTime() {
    return checkMedicationTime;
  }

  public void setCheckMedicationTime(Date checkMedicationTime) {
    this.checkMedicationTime = checkMedicationTime;
  }

  public static int getRecommandCheckingStatusNoCheck() {
    return RECOMMAND_CHECKING_STATUS_NO_CHECK;
  }

  @Column(name = "allocate_pharmacist_sign_status")
  public Integer getAllocatePharmacistSignStatus() {
    return allocatePharmacistSignStatus;
  }

  public void setAllocatePharmacistSignStatus(Integer allocatePharmacistSignStatus) {
    this.allocatePharmacistSignStatus = allocatePharmacistSignStatus;
  }

  @Column(name = "allocate_pharmacist_id")
  public Long getAllocatePharmacistId() {
    return allocatePharmacistId;
  }

  public void setAllocatePharmacistId(Long allocatePharmacistId) {
    this.allocatePharmacistId = allocatePharmacistId;
  }

  @Column(name = "allocate_pharmacist_name")
  public String getAllocatePharmacistName() {
    return allocatePharmacistName;
  }

  public void setAllocatePharmacistName(String allocatePharmacistName) {
    this.allocatePharmacistName = allocatePharmacistName;
  }

  @Column(name = "allocate_pharmacist_sign_time")
  public Date getAllocatePharmacistSignTime() {
    return allocatePharmacistSignTime;
  }

  public void setAllocatePharmacistSignTime(Date allocatePharmacistSignTime) {
    this.allocatePharmacistSignTime = allocatePharmacistSignTime;
  }

  @Column(name = "disease_id")
  public String getDiseaseId() {
      return diseaseId;
  }

  public void setDiseaseId(String diseaseId) {
      this.diseaseId = diseaseId;
  }

  @Column(name = "case_id")
  public String getCaseId() {
      return caseId;
  }

  public void setCaseId(String caseId) {
      this.caseId = caseId;
  }
}
